import {request} from "./request";

//1.搜索分页营销管理数据
export function getMarketingPageInfo({pageNum,pageSize,customerName, createMan, state,chanceSource,devResult}){
    return request({
        url: '/mar/salechance/pager',
        method: 'get',
        params:{
            pageNum,
            pageSize,
            customerName,
            createMan,
            state,
            devResult,
            chanceSource
        }
    })
}

//2.删除分页营销
/* 点击确认执行的方法 */
export function deleteSaleChance(id){
    return request({
        url: '/mar/salechance/' + id,
        method: 'delete'
    })
}
//添加营销机会
export function addSaleChance(saleChance){
    return request({
        url:'/mar/salechance/add',
        method:'post',
        data:saleChance
    })
}
//修改营销机会
export function updateSaleChance(saleChance){
    return request({
        url:'/mar/salechance/update',
        method:'put',
        data:saleChance
    })
}
//查询回收站信息
export function deleted({pageNum,pageSize,customerName, createMan, state,chanceSource,devResult}){
    return request({
        url:'/mar/salechance/del',
        method:'get',
        params:{
            pageNum,
            pageSize,
            customerName,
            createMan,
            state,
            devResult,
            chanceSource
        }
    })
}
//回收站还原操作
export function restore(id){
    return request({
        url: '/mar/salechance/hy/' + id,
        method: 'put',
        date:id
    })
}
